﻿/*
 * XCoder v3.4.2011.0316
 * 作者：nnhy/X
 * 时间：2011-04-04 11:54:06
 * 版权：版权所有 (C) 新生命开发团队 2010
*/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.DataAccessLayer;

namespace NXCMS.CMS
{
	/// <summary>
	/// 发布
	/// </summary>
	[Serializable]
	[DataObject]
	[Description("发布")]
	[BindTable("Post", Description = "发布", ConnName = "CMS", DbType = DatabaseType.SqlServer)]
	public partial class Post
	{
		#region 属性
		private Int32 _ID;
		/// <summary>
		/// 编号
		/// </summary>
		[Description("编号")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(1, "ID", "编号", "", "int", 10, 0, false)]
		public Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChange("ID", value)) _ID = value; }
		}

		private Int32 _SiteID;
		/// <summary>
		/// 站点编号
		/// </summary>
		[Description("站点编号")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(2, "SiteID", "站点编号", "", "int", 10, 0, false)]
		public Int32 SiteID
		{
			get { return _SiteID; }
			set { if (OnPropertyChange("SiteID", value)) _SiteID = value; }
		}

		private Int32 _ForumID;
		/// <summary>
		/// 论坛编号
		/// </summary>
		[Description("论坛编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(3, "ForumID", "论坛编号", "", "int", 10, 0, false)]
		public Int32 ForumID
		{
			get { return _ForumID; }
			set { if (OnPropertyChange("ForumID", value)) _ForumID = value; }
		}

		private Int32 _ThemeID;
		/// <summary>
		/// 主题编号
		/// </summary>
		[Description("主题编号")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(4, "ThemeID", "主题编号", "", "int", 10, 0, false)]
		public Int32 ThemeID
		{
			get { return _ThemeID; }
			set { if (OnPropertyChange("ThemeID", value)) _ThemeID = value; }
		}

		private Boolean _First;
		/// <summary>
		/// 第一
		/// </summary>
		[Description("第一")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(5, "First", "第一", "", "bit", 0, 0, false)]
		public Boolean First
		{
			get { return _First; }
			set { if (OnPropertyChange("First", value)) _First = value; }
		}

		private String _Subject;
		/// <summary>
		/// 主体
		/// </summary>
		[Description("主体")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(6, "Subject", "主体", "", "nvarchar(100)", 0, 0, true)]
		public String Subject
		{
			get { return _Subject; }
			set { if (OnPropertyChange("Subject", value)) _Subject = value; }
		}

		private String _Message;
		/// <summary>
		/// 消息
		/// </summary>
		[Description("消息")]
		[DataObjectField(false, false, true, 1073741823)]
		[BindColumn(7, "Message", "消息", "", "ntext", 0, 0, true)]
		public String Message
		{
			get { return _Message; }
			set { if (OnPropertyChange("Message", value)) _Message = value; }
		}

		private String _IP;
		/// <summary>
		/// 地址
		/// </summary>
		[Description("地址")]
		[DataObjectField(false, false, true, 20)]
		[BindColumn(8, "IP", "地址", "", "nvarchar(20)", 0, 0, true)]
		public String IP
		{
			get { return _IP; }
			set { if (OnPropertyChange("IP", value)) _IP = value; }
		}

		private Boolean _Status;
		/// <summary>
		/// 状态
		/// </summary>
		[Description("状态")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(9, "Status", "状态", "", "bit", 0, 0, false)]
		public Boolean Status
		{
			get { return _Status; }
			set { if (OnPropertyChange("Status", value)) _Status = value; }
		}

		private Boolean _IsHidden;
		/// <summary>
		/// 是否隐藏
		/// </summary>
		[Description("是否隐藏")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(10, "IsHidden", "是否隐藏", "", "bit", 0, 0, false)]
		public Boolean IsHidden
		{
			get { return _IsHidden; }
			set { if (OnPropertyChange("IsHidden", value)) _IsHidden = value; }
		}

		private Boolean _Invisible;
		/// <summary>
		/// 
		/// </summary>
		[Description("")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(11, "Invisible", "", "", "bit", 0, 0, false)]
		public Boolean Invisible
		{
			get { return _Invisible; }
			set { if (OnPropertyChange("Invisible", value)) _Invisible = value; }
		}

		private Boolean _VerifyFlag;
		/// <summary>
		/// 验证标记
		/// </summary>
		[Description("验证标记")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(12, "VerifyFlag", "验证标记", "", "bit", 0, 0, false)]
		public Boolean VerifyFlag
		{
			get { return _VerifyFlag; }
			set { if (OnPropertyChange("VerifyFlag", value)) _VerifyFlag = value; }
		}

		private Int32 _Layer;
		/// <summary>
		/// 层
		/// </summary>
		[Description("层")]
		[DataObjectField(false, false, true, 10)]
		[BindColumn(13, "Layer", "层", "", "int", 10, 0, false)]
		public Int32 Layer
		{
			get { return _Layer; }
			set { if (OnPropertyChange("Layer", value)) _Layer = value; }
		}

		private Boolean _ApplyDel;
		/// <summary>
		/// 申请删除
		/// </summary>
		[Description("申请删除")]
		[DataObjectField(false, false, true, 1)]
		[BindColumn(14, "ApplyDel", "申请删除", "", "bit", 0, 0, false)]
		public Boolean ApplyDel
		{
			get { return _ApplyDel; }
			set { if (OnPropertyChange("ApplyDel", value)) _ApplyDel = value; }
		}

		private String _prop1;
		/// <summary>
		/// 属性1
		/// </summary>
		[Description("属性1")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(15, "prop1", "属性1", "", "nvarchar(50)", 0, 0, true)]
		public String prop1
		{
			get { return _prop1; }
			set { if (OnPropertyChange("prop1", value)) _prop1 = value; }
		}

		private String _prop2;
		/// <summary>
		/// 属性2
		/// </summary>
		[Description("属性2")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(16, "prop2", "属性2", "", "nvarchar(50)", 0, 0, true)]
		public String prop2
		{
			get { return _prop2; }
			set { if (OnPropertyChange("prop2", value)) _prop2 = value; }
		}

		private String _prop3;
		/// <summary>
		/// 属性3
		/// </summary>
		[Description("属性3")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(17, "prop3", "属性3", "", "nvarchar(50)", 0, 0, true)]
		public String prop3
		{
			get { return _prop3; }
			set { if (OnPropertyChange("prop3", value)) _prop3 = value; }
		}

		private String _prop4;
		/// <summary>
		/// 属性4
		/// </summary>
		[Description("属性4")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(18, "prop4", "属性4", "", "nvarchar(50)", 0, 0, true)]
		public String prop4
		{
			get { return _prop4; }
			set { if (OnPropertyChange("prop4", value)) _prop4 = value; }
		}

		private String _AddUser;
		/// <summary>
		/// 添加用户
		/// </summary>
		[Description("添加用户")]
		[DataObjectField(false, false, false, 100)]
		[BindColumn(19, "AddUser", "添加用户", "", "nvarchar(100)", 0, 0, true)]
		public String AddUser
		{
			get { return _AddUser; }
			set { if (OnPropertyChange("AddUser", value)) _AddUser = value; }
		}

		private DateTime _AddTime;
		/// <summary>
		/// 添加时间
		/// </summary>
		[Description("添加时间")]
		[DataObjectField(false, false, false, 7)]
		[BindColumn(20, "AddTime", "添加时间", "", "datetime2", 7, 0, false)]
		public DateTime AddTime
		{
			get { return _AddTime; }
			set { if (OnPropertyChange("AddTime", value)) _AddTime = value; }
		}

		private String _ModifyUser;
		/// <summary>
		/// 修改用户
		/// </summary>
		[Description("修改用户")]
		[DataObjectField(false, false, true, 100)]
		[BindColumn(21, "ModifyUser", "修改用户", "", "nvarchar(100)", 0, 0, true)]
		public String ModifyUser
		{
			get { return _ModifyUser; }
			set { if (OnPropertyChange("ModifyUser", value)) _ModifyUser = value; }
		}

		private DateTime _ModifyTime;
		/// <summary>
		/// 修改时间
		/// </summary>
		[Description("修改时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(22, "ModifyTime", "修改时间", "", "datetime2", 7, 0, false)]
		public DateTime ModifyTime
		{
			get { return _ModifyTime; }
			set { if (OnPropertyChange("ModifyTime", value)) _ModifyTime = value; }
		}

		private String _BackupNo;
		/// <summary>
		/// 备份编号
		/// </summary>
		[Description("备份编号")]
		[DataObjectField(false, false, true, 15)]
		[BindColumn(23, "BackupNo", "备份编号", "", "nvarchar(15)", 0, 0, true)]
		public String BackupNo
		{
			get { return _BackupNo; }
			set { if (OnPropertyChange("BackupNo", value)) _BackupNo = value; }
		}

		private String _BackupOperator;
		/// <summary>
		/// 备份操作者
		/// </summary>
		[Description("备份操作者")]
		[DataObjectField(false, false, true, 200)]
		[BindColumn(24, "BackupOperator", "备份操作者", "", "nvarchar(200)", 0, 0, true)]
		public String BackupOperator
		{
			get { return _BackupOperator; }
			set { if (OnPropertyChange("BackupOperator", value)) _BackupOperator = value; }
		}

		private DateTime _BackupTime;
		/// <summary>
		/// 备份时间
		/// </summary>
		[Description("备份时间")]
		[DataObjectField(false, false, true, 7)]
		[BindColumn(25, "BackupTime", "备份时间", "", "datetime2", 7, 0, false)]
		public DateTime BackupTime
		{
			get { return _BackupTime; }
			set { if (OnPropertyChange("BackupTime", value)) _BackupTime = value; }
		}

		private String _BackupMemo;
		/// <summary>
		/// 备份注释
		/// </summary>
		[Description("备份注释")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(26, "BackupMemo", "备份注释", "", "nvarchar(50)", 0, 0, true)]
		public String BackupMemo
		{
			get { return _BackupMemo; }
			set { if (OnPropertyChange("BackupMemo", value)) _BackupMemo = value; }
		}
		#endregion

		#region 获取/设置 字段值
		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case "ID" : return _ID;
					case "SiteID" : return _SiteID;
					case "ForumID" : return _ForumID;
					case "ThemeID" : return _ThemeID;
					case "First" : return _First;
					case "Subject" : return _Subject;
					case "Message" : return _Message;
					case "IP" : return _IP;
					case "Status" : return _Status;
					case "IsHidden" : return _IsHidden;
					case "Invisible" : return _Invisible;
					case "VerifyFlag" : return _VerifyFlag;
					case "Layer" : return _Layer;
					case "ApplyDel" : return _ApplyDel;
					case "prop1" : return _prop1;
					case "prop2" : return _prop2;
					case "prop3" : return _prop3;
					case "prop4" : return _prop4;
					case "AddUser" : return _AddUser;
					case "AddTime" : return _AddTime;
					case "ModifyUser" : return _ModifyUser;
					case "ModifyTime" : return _ModifyTime;
					case "BackupNo" : return _BackupNo;
					case "BackupOperator" : return _BackupOperator;
					case "BackupTime" : return _BackupTime;
					case "BackupMemo" : return _BackupMemo;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case "ID" : _ID = Convert.ToInt32(value); break;
					case "SiteID" : _SiteID = Convert.ToInt32(value); break;
					case "ForumID" : _ForumID = Convert.ToInt32(value); break;
					case "ThemeID" : _ThemeID = Convert.ToInt32(value); break;
					case "First" : _First = Convert.ToBoolean(value); break;
					case "Subject" : _Subject = Convert.ToString(value); break;
					case "Message" : _Message = Convert.ToString(value); break;
					case "IP" : _IP = Convert.ToString(value); break;
					case "Status" : _Status = Convert.ToBoolean(value); break;
					case "IsHidden" : _IsHidden = Convert.ToBoolean(value); break;
					case "Invisible" : _Invisible = Convert.ToBoolean(value); break;
					case "VerifyFlag" : _VerifyFlag = Convert.ToBoolean(value); break;
					case "Layer" : _Layer = Convert.ToInt32(value); break;
					case "ApplyDel" : _ApplyDel = Convert.ToBoolean(value); break;
					case "prop1" : _prop1 = Convert.ToString(value); break;
					case "prop2" : _prop2 = Convert.ToString(value); break;
					case "prop3" : _prop3 = Convert.ToString(value); break;
					case "prop4" : _prop4 = Convert.ToString(value); break;
					case "AddUser" : _AddUser = Convert.ToString(value); break;
					case "AddTime" : _AddTime = Convert.ToDateTime(value); break;
					case "ModifyUser" : _ModifyUser = Convert.ToString(value); break;
					case "ModifyTime" : _ModifyTime = Convert.ToDateTime(value); break;
					case "BackupNo" : _BackupNo = Convert.ToString(value); break;
					case "BackupOperator" : _BackupOperator = Convert.ToString(value); break;
					case "BackupTime" : _BackupTime = Convert.ToDateTime(value); break;
					case "BackupMemo" : _BackupMemo = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}
		#endregion

		#region 字段名
		/// <summary>
		/// 取得发布字段名的快捷方式
		/// </summary>
		public class _
		{
			///<summary>
			/// 编号
			///</summary>
			public const String ID = "ID";

			///<summary>
			/// 站点编号
			///</summary>
			public const String SiteID = "SiteID";

			///<summary>
			/// 论坛编号
			///</summary>
			public const String ForumID = "ForumID";

			///<summary>
			/// 主题编号
			///</summary>
			public const String ThemeID = "ThemeID";

			///<summary>
			/// 第一
			///</summary>
			public const String First = "First";

			///<summary>
			/// 主体
			///</summary>
			public const String Subject = "Subject";

			///<summary>
			/// 消息
			///</summary>
			public const String Message = "Message";

			///<summary>
			/// 地址
			///</summary>
			public const String IP = "IP";

			///<summary>
			/// 状态
			///</summary>
			public const String Status = "Status";

			///<summary>
			/// 是否隐藏
			///</summary>
			public const String IsHidden = "IsHidden";

			///<summary>
			/// 
			///</summary>
			public const String Invisible = "Invisible";

			///<summary>
			/// 验证标记
			///</summary>
			public const String VerifyFlag = "VerifyFlag";

			///<summary>
			/// 层
			///</summary>
			public const String Layer = "Layer";

			///<summary>
			/// 申请删除
			///</summary>
			public const String ApplyDel = "ApplyDel";

			///<summary>
			/// 属性1
			///</summary>
			public const String prop1 = "prop1";

			///<summary>
			/// 属性2
			///</summary>
			public const String prop2 = "prop2";

			///<summary>
			/// 属性3
			///</summary>
			public const String prop3 = "prop3";

			///<summary>
			/// 属性4
			///</summary>
			public const String prop4 = "prop4";

			///<summary>
			/// 添加用户
			///</summary>
			public const String AddUser = "AddUser";

			///<summary>
			/// 添加时间
			///</summary>
			public const String AddTime = "AddTime";

			///<summary>
			/// 修改用户
			///</summary>
			public const String ModifyUser = "ModifyUser";

			///<summary>
			/// 修改时间
			///</summary>
			public const String ModifyTime = "ModifyTime";

			///<summary>
			/// 备份编号
			///</summary>
			public const String BackupNo = "BackupNo";

			///<summary>
			/// 备份操作者
			///</summary>
			public const String BackupOperator = "BackupOperator";

			///<summary>
			/// 备份时间
			///</summary>
			public const String BackupTime = "BackupTime";

			///<summary>
			/// 备份注释
			///</summary>
			public const String BackupMemo = "BackupMemo";
		}
		#endregion
	}
}